import request from '@/utils/Request'

/**
 * 员工新增报损单
 * @param form
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const insertDamageReportApi = (form) =>{
    return request.post('/damageReport/insert',form)
}

/**
 * 管理员管理和查看
 */

export const loadDamageReportApi = (form) =>{
    return request.get('/damageReport/selectAssociation',{
        params:form
    })
}
/**
 * 根据商品名成查询报损单
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const selectByProductNameApi = (data) =>{
    return request.get('/damageReport/selectByName',{
        params:data
    })
}
export const deleteDamageReportApi = (data) =>{
    return request.delete(`/damageReport/deleteById/${data.id}`)
}

export const deleteBatchDamageReportApi = (data) =>{
    return request.post('/damageReport/deleteBatch',data)
}